<?php

function get_error($var) {
    if ($var == 0)
        $var = '';
    else
        $var = 'Cant upload file doc and pdf';
    return $var;
}

//function get_file($url) {
//    $url = explode('%20', $url);
//    $count = count($url);
//    if ($count == 2) {
//        $file = $url[0] . '_' . $url[1];
//    } elseif ($count == 3) {
//        $file = $url[0] . '_' . $url[1] . '_' . $url[2];
//    } elseif ($count == 4) {
//        $file = $url[0] . '_' . $url[1] . '_' . $url[2] . '_' . $url[3];
//    }
//    return $file;
//}

function get_file($file) {
    $file = explode('%20', $file);
    $file = implode('_', $file);
    return $file;
}

function get_download($url) {
    
}